﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace COFE.Core.Tasks
{
    public class COFEActionQueue : ICOFEActionQueue
    {
        #region Constructor

        public COFEActionQueue(ICOFEAction[] actions)
        {

        }

        private static Action constructTaskAction(ICOFEAction[] actions)
        {
            return null;
        }

        #endregion

        #region Methods


        public void Enqueue(ICOFEAction action)
        {
            throw new NotImplementedException();
        }

        public void Invoke()
        {
            throw new NotImplementedException();
        }

        #endregion

        #region Data

        private int _currentAction;
        private List<ICOFEAction> _actionList = new List<ICOFEAction>();

        #endregion

        #region Public Properties
        public event EventHandler<TaskProgressEventArgs> Progress;

        public new StatusType Status { get; private set; }

        public int CurrentAction { get { return _currentAction; } }

        public int TotalActions { get { return _actionList.Count; } }

        public ICOFEAction this[int id]
        {
            get
            {
                if (id >= _actionList.Count) throw new KeyNotFoundException(id.ToString());
                return _actionList[id];
            }
        }

        #endregion










    }
}
